<span class="p-fluid">
  <p-autoComplete
    [(ngModel)]="inputValue"
    [suggestions]="filteredUsers"
    (completeMethod)="filterUsers($event)"
    field="username"
    scrollHeight="300px"
    [forceSelection]="true"
  >
    <ng-template let-user pTemplate="item">
      <nb-user
        [picture]="user?.avatar"
        [name]="user?.name"
        [showTitle]="false"
        (click)="getChat(user.uid)">
      </nb-user>
    </ng-template>
  </p-autoComplete>
  <nb-icon icon="search-outline"></nb-icon>
</span>
